import requests,json
import pandas as pd
wu_key = "513aa007abc35c285a648025471ee1f1"

# 天气查询
def weather(key,city,extension="all",output="json"):
    """根据用户输入的adcode，查询目标区域当前/未来的天气情况"""
    weather_url = "https://restapi.amap.com/v3/weather/weatherInfo?parameters"
    params = {
        "key":key,
        "city":city,
        "extensions":extension,
        "output":output
    }
    r = requests.get(weather_url,params=params)
    results = r.json()
    return results

